home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / drdobbs / 1987 / 11 / error.c < prev    next >
C/C++ Source or Header  |  1987-10-08  |  616b  |  26 lines

  1. /*-----------------------------------------------------------
  2.     error.c
  3.     
  4.     very primitive error handler
  5.     
  6.     William May
  7.     303A Ridgefield Circle
  8.     Clinton, MA 01510
  9.   -----------------------------------------------------------*/
  10.  
  11. #include <stdio.h>
  12.  
  13. /*-----------------------------------------------------------
  14.     if an error number specified then print it,
  15.     otherwise only print the message
  16.  -----------------------------------------------------------*/
  17. syserr(errno, s)
  18. int errno;
  19. char *s;
  20. {
  21.     if (errno) printf("Error (%d): %s\n", errno, s);
  22.     else printf("Error: %s\n", s);
  23.     
  24.     ExitToShell();
  25. }
  26.